package com.sales.service.view;

import com.sales.service.R;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

/**
 * this activity is used to display more information regarding the previous activities data.
 * 
 * @author Sega
 *
 */
public class LeadInfoActivity extends BaseActivity {

	/**
	 * Strings declared for the debugging process.
	 */
	private static final String TagProject = "SalesService";
	private static final String TagPage = "LeadInfo ::";
	
	private EditText edittxtCompany;
	
	/* (non-Javadoc)
	 * @see com.sales.service.view.BaseActivity#onCreate(android.os.Bundle)
	 * 
	 * the layout is set.
	 * the header content is set.
	 * the data display is made.
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.leadinfo_layout);
		Log.i(TagProject, TagPage);
		
		setHeaderContent();
		
		displayContent();
		
	}

	/**
	 * Header content is set.
	 */
	private void setHeaderContent() {
		Button btnLeft = (Button)findViewById(R.id.btnLeft);
		btnLeft.setVisibility(View.VISIBLE);
		
		Button btnRight = (Button)findViewById(R.id.btnRight);
		btnRight.setVisibility(View.VISIBLE);
		
		TextView txtTitle = (TextView)findViewById(R.id.txtTitle);
		txtTitle.setText("Lead information");
	}
	
	/**
	 * the data is displayed in the UI
	 */
	private void displayContent() {
		Bundle extras = getIntent().getExtras();
		
		edittxtCompany = (EditText)findViewById(R.id.edttxtCompany);
		edittxtCompany.setText(extras.getString("3"));
	}
}
